﻿package com.everydayflash.pv3d {
	
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.net.URLRequest;
	
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFieldType;
	import flash.text.TextFormat;
	import flash.events.TextEvent;
	/**
	* ...
	* @author Default
	*/
	public class BlogLink extends Sprite {
		
		private var bg:Sprite;
		private var style:TextFormat;
		private var link:TextField;
		private var w:Number = 148;
		
		public function BlogLink() {	
			addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event):void {
			bg = new Sprite();
			bg.graphics.beginFill(0xffffff);
			bg.graphics.drawRect(0, 0, w, 30);
			addChild(bg);
			
			style = new TextFormat();
			style.font = "Arial";
			style.size = 12;
			style.color = 0x000000;
			
			link = new TextField();
			link.autoSize = TextFieldAutoSize.LEFT;
			link.defaultTextFormat = style;
			link.htmlText = "<a href='http://www.everydayflash.com'>www.everydayflash.com</a>";
			link.x = 8;
			link.selectable = false;
			link.y = 6;
			addChild(link);
		}
		
		public function resize():void {
			this.x = stage.stageWidth - w;
			this.y = stage.stageHeight - 30;
		
		}
		
	}
	
}